<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cisau信院免费邮--校园邮箱第一品牌</title>
<link rel="shortcut icon" href="<%=basePath %>images/favicon.ico" type="image/x-icon"/>

<link rel="stylesheet" href="<%=basePath%>js/jPlayer/jplayer.flat.css"
	type="text/css" />
<link rel="stylesheet" href="<%=basePath%>css/bootstrap.css"
	type="text/css" />
<link rel="stylesheet" href="<%=basePath%>css/animate.css"
	type="text/css" />
<link rel="stylesheet" href="<%=basePath%>css/font-awesome.min.css"
	type="text/css" />
<link rel="stylesheet" href="<%=basePath%>css/simple-line-icons.css"
	type="text/css" />
<link rel="stylesheet" href="<%=basePath%>css/font.css" type="text/css" />
<link rel="stylesheet" href="<%=basePath%>css/app.css" type="text/css" />
</head>
<script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
<body class="">

	<jsp:include page="top.jsp"></jsp:include>
	<section class="vbox"> <section id="content"> <section
		class="vbox"> <section class="scrollable padder">
	<div class="m-b-md"></div>
	<div class="row" style="margin-left: 150px;">



		<div class="col-sm-6" style="min-width: 1500px; min-height: 1000px;">
			<!-- 表单开始 -->
			<form data-validate="parsley" enctype="multipart/form-data"
				method="post" action="<%=basePath%>inform/addInform">
				<input type="hidden" value="${USER.email }" name="owner"> <input
					type="hidden" name="level" id="levell">
				<section class="panel panel-default"> <header
					class="panel-heading"> <span class="h4">编辑公告</span> </header>
				<div class="panel-body">



					<div class="form-group pull-in clearfix">




						<label class="col-sm-2 control-label"
							style="width: 100%; margin-left: 20px;">等级</label>
						<div class="col-sm-10" style="width: 50%; margin-left: 20px;"
							id="level">

							<div class="radio i-checks">
								<label> <input type="radio" name="a" value="1">
									<i></i> 一级响应
								</label>
							</div>
							<div class="radio i-checks">
								<label> <input type="radio" name="a" value="2" checked>
									<i></i> 二级响应
								</label>
							</div>
							<div class="radio i-checks">
								<label> <input type="radio" name="a" value="3" checked>
									<i></i> 三级响应
								</label>
							</div>

						</div>
						<script type="text/javascript">
							window.onload=function(){
 			 				var level=document.getElementById("level");
  							var levell=document.getElementById("levell");
  							radios=level.getElementsByTagName("input");
  							var bt=document.getElementById("bt");
  							bt.onclick=function(){
    							for(var i=0;i<radios.length;i++){
      								if(radios[i].checked==true){
    	  								levell.value = radios[i].value;
      								}
   	 							}
  							}
						}
						</script>

						<div class="form-group" style="width: 50%; margin-left: 20px;">


							<label class="col-sm-2 control-label">类别：</label> <select
								class="form-control m-b" style="margin-left: 15px;"
								name="typeId" value="typeId" id="typeList">

							</select>


						</div>



						<div class="form-group" style="width: 50%; margin-left: 20px;">
							<label class="col-sm-2 control-label">标题</label> <input
								type="text" name="title" style="margin-left: 15px;"
								class="form-control" required="required">
						</div>
						<div class="form-group" style="width: 50%; margin-left: 20px;">
							<label class="col-sm-2 control-label">说明</label> <input
								type="text" name="explain" style="margin-left: 15px;"
								data-required="true" class="form-control">
						</div>
						<div class="form-group" style="width: 50%; margin-left: 20px;">
							<label class="col-sm-2 control-label">通知内容：</label>
							<textarea class="form-control" name="content"
								style="margin-left: 15px;" rows="6" data-minwords="6"
								data-required="true" placeholder="input your message"></textarea>


						</div>

					</div>





					<!-- <div class="form-group">
                            <label>Message</label>
                            <textarea class="form-control" rows="6" data-minwords="6" data-required="true" placeholder="Type your message"></textarea>
                          </div> -->


					<label class="col-sm-2 control-label">头像：</label>
					<div class="col-sm-10"
						style="margin-top: 30px; margin-left: -235px;">


						<input type="file" name="uploadFile" class="filestyle"
							data-classButton="btn btn-default"
							data-classInput="form-control inline v-middle input-s">


					</div>
				</div>
				<footer class="panel-footer text-right bg-light lter">
				<button type="submit" class="btn btn-success btn-s-xs" id="bt">Submit</button>
				</footer> </section>
			</form>
			<!-- 表单结束 -->

		</div>
	</div>


	</section> </section> <a href="#" class="hide nav-off-screen-block"
		data-toggle="class:nav-off-screen,open" data-target="#nav,html"></a> </section>
	</section>

	<script src="<%=basePath%>js/wizard/jquery.bootstrap.wizard.js"></script>
	<script src="<%=basePath%>js/wizard/demo.js"></script>
	<script src="<%=basePath%>js/app.plugin.js"></script>
	<script type="text/javascript"
		src="<%=basePath%>js/jPlayer/jquery.jplayer.min.js"></script>
	<script type="text/javascript"
		src="<%=basePath%>js/jPlayer/add-on/jplayer.playlist.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>js/jPlayer/demo.js"></script>

	<script src="<%=basePath%>js/file-input/bootstrap-filestyle.min.js"></script>
	<script src="<%=basePath%>js/wysiwyg/jquery.hotkeys.js"></script>
	<script src="<%=basePath%>js/wysiwyg/bootstrap-wysiwyg.js"></script>
	<script src="<%=basePath%>js/wysiwyg/demo.js"></script>

</body>
<script>
  $(document).ready(function(){
	selAllType();
});
	function selAllType(){
		debugger;
	
		
		$.ajax( {
						url:'<%=basePath%>inform/getType',
						type:'post',
						data: {
					
						},
						datatype : "json",//"xml", "html", "script", "json", "jsonp", "text".           
						success : function(data) {
							var json=eval('(' + data + ')');
							$.each(json, function (n, item) {
								
								addType(n,item);
							});
							
							
						},
						error : function() {
			                alert("异常！！！");
			                selAllFriend();	
			            }
				});
	}
	function addType(n,item){
		
		
		var val = "<option value="+item.id+" >"+item.type+"</option>";
		
		
		$("#typeList").append(val);
	}
	<!-- (这段js用来将下拉框中的放邮箱值得value赋值给表单框) -->
$(function(){
	$("").click(function(){
		
		<!--  -->
    	debugger;
    	
		
	}
			
	)
    	
		
	

    


  });
</script>
</html>